#ifndef DEVICEMANAGEMENTUI_H
#define DEVICEMANAGEMENTUI_H

#include <QDialog>
#include <QMessageBox>

#include "addnewdevice.h"
#include "DeviceManagementService.h"
#include "global.h"
#include "ProcedureService.h"
#include "InstructionsService.h"
#include "updatedeviceinfo.h"
#include "custommessagebox.h"

namespace Ui {
class SlaveComputerManagement;
}

class SlaveComputerManagement : public QDialog
{
    Q_OBJECT

public:
    explicit SlaveComputerManagement(QDialog *parent = nullptr);
    ~SlaveComputerManagement();

signals:
    void deviceStatusChanged();


public slots:
    void renderDeviceInfo(QList<QHash<QString, QString>>);
    void changeFilterCondition(int);
    void filterDeviceTable();
    void addNewDeviceInfoToDB(AddNewDevice::DeviceStruct);
private:
    Ui::SlaveComputerManagement *ui;
    DeviceManagement *DMDB;
    AddNewDevice *addNDev;
    ReviseDeviceInfo *reviseDeviceInfo;
    int index;
    QString ipData;
    CustomMessageBox *cusMsg;

    void sleep(int);

    void reviseDeviceTable(int row);
    void closeEvent(QCloseEvent *) override;
};

#endif // DEVICEMANAGEMENTUI_H
